﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace DFGK_WMS.Model.Models
{
    /// <summary>
    /// 移库单明细
    /// </summary>
    [Table("T_TransferBinOrderDetail")]
    public class TransferBinOrderDetail:BaseEntity
    {
        /// <summary>
        /// 移库单表Id
        /// </summary>
        public long? OrderId { get; set; }
        /// <summary>
        /// 移库单编号
        /// </summary>
        [MaxLength(30)]
        public string OrderSn { get; set; }
        /// <summary>
        /// 物料ID
        /// </summary>
        public long? MaterialId { get; set; }
        /// <summary>
        /// 物料名称
        /// </summary>
        [MaxLength(30)]
        public string MaterialName { get; set; }
        /// <summary>
        /// 移库前库房Id
        /// </summary>
        public long? FromWhId { get; set; }
        /// <summary>
        /// 移库前库房名称
        /// </summary>
        [MaxLength(30)]
        public string FromWhName { get; set; }
        /// <summary>
        /// 移库前库房编码
        /// </summary>
        [MaxLength(30)]
        public string FromWhCode { get; set; }
        /// <summary>
        /// 移库前库房区域ID
        /// </summary>
        public long? FromRegionId { get; set; }
        /// <summary>
        /// 移库前库房区域名称
        /// </summary>
        [MaxLength(30)]
        public string FromRegionName { get; set; }
        /// <summary>
        /// 移库前逻辑分区：为逻辑分区编码，对应中间库T_SM_Region表的主键
        /// </summary>
        [MaxLength(30)]
        public string FromRegionCode { get; set; }
        /// <summary>
        /// 移库前库位ID(仓位号)
        /// </summary>
        public long? FromLocationId { get; set; }
        /// <summary>
        /// 移库前库位名称
        /// </summary>
        [MaxLength(30)]
        public string FromLocationName { get; set; }
        /// <summary>
        /// 移库前仓位编码
        /// </summary>
        [MaxLength(30)]
        public string FromLocationCode { get; set; }
        /// <summary>
        /// 移库后库房ID
        /// </summary>
        public long? ToWhId { get; set; }
        /// <summary>
        /// 移库后库房名称
        /// </summary>
        [MaxLength(30)]
        public string ToWhName { get; set; }
        /// <summary>
        /// 移库后库房编码
        /// </summary>
        [MaxLength(30)]
        public string ToWhCode { get; set; }
        /// <summary>
        /// 移库后库房区域ID
        /// </summary>
        public long? ToRegionId { get; set; }
        /// <summary>
        /// 移库后库房区域名称
        /// </summary>
        [MaxLength(30)]
        public string ToRegionName { get; set; }
        /// <summary>
        /// 移库后逻辑分区：为逻辑分区编码
        /// </summary>
        [MaxLength(30)]
        public string ToRegionCode { get; set; }
        /// <summary>
        /// 移库后库位ID
        /// </summary>
        public long? ToLocationId { get; set; }
        /// <summary>
        /// 移库后库位名称
        /// </summary>
        [MaxLength(30)]
        public string ToLocationName { get; set; }
        /// <summary>
        /// 移库后仓位编码(目标仓位)
        /// </summary>
        [MaxLength(30)]
        public string ToLocationCode { get; set; }
        /// <summary>
        /// 期望移库的垛数:立库必须整垛移库
        /// </summary>
        [Column(TypeName = "decimal(18,2)")]
        public decimal? ExpectedStackingQty { get; set; }
        /// <summary>
        /// 实际完成移库的垛数:立库会存在无法移库的情况，平库不存在
        /// </summary>
        [Column(TypeName = "decimal(18,2)")]
        public decimal? ActualStackingQty { get; set; }
        /// <summary>
        /// 调仓货品数量:立库则是该垛下物料总数量，平库则是人工需要拣货移库的数量（不一定是整箱移）
        /// </summary>
        public int? Quantity { get; set; }
        /// <summary>
        /// 是否满垛优先移库:Y优先满垛移库、N优先不满垛移库
        /// </summary>
        public bool? IsFullStackingProirity { get; set; }
        /// <summary>
        /// 移库订单执行的异常编码
        /// </summary>
        [MaxLength(30)]
        public string ExceptionCode { get; set; }
        /// <summary>
        /// 移库订单执行的异常文本
        /// </summary>
        [MaxLength(30)]
        public string ExceptionText { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [MaxLength(30)]
        public string Remark { get; set; }
       
        /// <summary>
        /// 单据状态：0-创建;1-提交;2-审核通过;3-作业中；4-已完成;5-强制完成;6-失效；7-异常
        /// </summary>
        public int? Status { get; set; }
        public int? FilterType { get; set; }
        [MaxLength(30)]
        public string ToLogicalPartCode { get; set; }
        public int? IsPriorityFilling { get; set; }
       
    }
}
